<?php

class News extends CI_Controller {

    public function __construct() {
        parent::__construct();
    }
    
    public function readAll() {
        $query = $this->db->get('users');
        return $query->result();
    }

    public function create($array = null){
        if ($array == null){
          return false;   
        }
        $query = $this->db->insert('users', $array);
    }

    public function update(){
        if ($array == null){
            return false;
        }
        $this->db->where("id_user", $array["id_user"]);
        $query = $tihs->db->update("users", $array);
    }

    public function delete(){
        if ($array == null){
            return false;
        }
        $this->db->where("id_user", $array["id_user"]);
        $query = $this->db->delete("users", $array);
    }

}